package com.itmuch.cloud;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;


/**
 * 
 *Zuul的过滤器
 *    1.创建一个类继承ZuulFilter
 *    2.启动项目： 	eureka,user,microservice-gateway-zuul-filter
 *    3.使用zuul的端口访问http://192.168.42.138:8040/microservice-provider-user/simple/1
 *    
 *                  
 */
@EnableZuulProxy
@SpringBootApplication
public class ZuulFilterApplication {
	
	public static void main(String[] args) {
		SpringApplication.run(ZuulFilterApplication.class, args);
		
	}
	
	@Bean
	public PreZuulFilter preZuulFilter() {
		return new PreZuulFilter();
	}
	
	
}
